package com.hxk.consumer.controller;

import com.hxk.api.bean.User;
import com.hxk.api.service.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * UserController
 *
 * @auther: dev000
 * @date: 2021/3/5 17:23
 */
@RestController
public class UserController {


    @Reference
    private UserService userService;

    @RequestMapping("/users")
    public List<User> getUsers(@RequestParam("userName") String userName){
        return userService.getUsers(userName);
    }
}
